1. Field of the Invention
The present invention relates to touch screen, and more particularly, to apparatus and method for calibrating touch screen.
2. Description of the Prior Art
Touch screen is an important human machine interface of modern electronic products. It is widely adopted in various consumer electronic products such as smartphone, tablet computer, notebook, and etc. Usually, touch screen comprises a display module and a sensor module coupled to the display module. User may use a part of human body, e.g., finger, or a stylus pen to touch or to approximate the sensor module. A processing device of the touch screen receives the sensed information sent from the sensor module. The sensed information usually comprises location information corresponding to the touch or approximation manipulated by user. Normally, the location information is represented with respect to a coordinate system of the touch screen.
The input of user is also usually corresponding to the output of the display module. For example, in case a confirmation dialog is pop up on the display module, it requires user to touch a button in the dialog to go on when finish reading the confirmation information shown in the dialog. User needs to use his/her finger or stylus to touch the button in order to dismiss the confirmation dialog.
In the example above, the area of button shown in the display module can be defined by four points in the coordinate system. After user inputs, the sensed touch information received by the processing device comprises at least one location coordinate. If the location coordinate is within the area defined by the four points, the processing device determines that user already touch the button; otherwise, the processing device keeps the confirmation dialog shown on the display module.
One of conditions that the simple example executes successfully is the coordinate system is applicable to the touch system. In other words, the display module and the coupled sensor module use the same coordinate system. If coordinate systems corresponding to the display module and the sensor module are not consistent, the simple example cannot successfully execute. Hence, during the manufacture and packaging of the touch screen, it is required to make sure of the coordinate systems corresponding to the display module and the sensor module is consistent completely.
However, in real world environments, due to the limitations imposed by manufacture skills, tools, and material, it is almost impossible to have completely consistent coordinate systems corresponding to the display module and the sensor module. In other words, the coordinate system of the display module cannot be one-on-one mapping to the coordinate system of the sensor module. Hence, there exists a need to calibrate these two coordinate systems.
The following example is applicable to resistive touch screen for explaining why there are errors happening between these two coordinate systems and the mathematical representations of the errors. People ordinary skilled in the art are able to understand that the scope of the present invention is not limited to resistive touch screen. As long as the calibration method and device provided by the present invention are applicable to calibrate these two coordinate systems, it falls into the scope of the present invention.
Please refer to FIG. 1, which shows a profiling diagram of a sensor module 1000 of a traditional resistive touch screen. The sensor module 1000 can be viewed as a multi layered structure. Light can pass through the top glass layer 1101 and the bottom glass layer 1102 which provide structural strength to protect inner layers.
In the middle of sandwich structure is a glass bead layer 1300 which comprises a plurality of glass beads used for separating two resistive film layers 1201 and 1202. Because of the glass bead layer 1300, the distance between these two resistive film layers 1201 and 1202 is roughly the same. These two resistive film layers 1201 and 1202 can be conductive films attached to the glass layers 1101 and 1102, respectively.
When user presses the top glass layer 1101, the glass layer 1101 and the resistive film layer 1201 are forced to deform such that the resistive film layer 1201 touches the resistive film layer 1202 where no glass bead laid in between. When the pressed point gets closer to glass bead, the pressure given by user has to be higher in order to deform the glass layer 1101 such that two resistive film layers 1201 and 1202 touch each other. Hence, the space interval between glass beads of the glass bead layer 1300 determines the resolution of the sensor module 1000.
One of the resistive film layers 1201 and 102 is coupled to a power source having a first voltage, and another one is coupled to a power source having a second voltage. When these two resistive film layers 1201 and 1202 touches, a processing module (not shown in FIG. 1) attached to the sensor module 1000 could determine where is pressed according to the voltage values readout.
Several errors may occur in the process of the processing module determining the pressed point, for example, electric interference, mechanical error, scaling factor, or unstable pressure given by user. There are many causes to introduce electric interferences. Most of them come from electromagnetic interference introduced by internal components of electronic system. Especially to touch sensor module sensing tiny electric current by high resistive circuit, low pass filter may be required in front of analog to digital converter. The software executed by the processing module or corresponding logic circuit not only filter out unreasonable burst interference data but also correct and predict the pressure instability cause by user.
Please refer to FIG. 2, which illustrates a diagram of errors of a touch screen. As mentioned already, the touch screen comprises a display module and a sensor module. A circle and an ellipse are shown in FIG. 2. The circuit represents a graph outputted from the display module. However, due to mentioned mechanical errors and scaling factors, what the circle maps to the sensor module becomes the ellipse. The ellipse is rotated. Its center is shifted. And a semi-major axis and a semi-minor axis are generated because of different scaling factors corresponding to these two axes. Therefore, there is a need to have a mathematic model to describe the two coordinate systems of the display module and the sensor module. After having a correct representation, calibration method could be found out in consequence.
Please refer to FIG. 3, which depicts a schematic diagram of mathematical representation of errors of a touch screen. There is a coordinate system of the touch screen shown in FIG. 3. For convenience, the coordinate system is assumed as the coordinate system of the display module. There are two points P1 and P2 shown in FIG. 3 and two vectors are formed between these two points and the original point, respectively. These two points or vectors are mapping to two coordinate systems of the display module and the sensor module, respectively. In other words, when the user presses the point P1, the sensor module reports the point P2.
Thus, there is a need to have a transformation matrix M to convert the coordinates of the sensor module to the coordinates of the display module. The relationship of these two points and the transformation matrix M could be represented as Formula (1) below:P1=M×P2  Formula (1)Put it in another way, if elements of the transformation matrix M could be found, it is possible to convert P2 to P1.
If using two orthogonal axes (X, Y) coordinate to represent these two vectors/points, Formula (2a) and (2b) are described below:P1=[X1, Y1]=[R1 cos Θ1, R1 sin Θ1]  Formula (2a)P2=[X2, Y2]=[R2 cos Θ2, R2 sin Θ2]  Formula (2b)
If the mentioned error comprises a rotation error Θr, P1 could be rewritten as Formula (3) below:P1=[R2 cos(Θ2+Θr), R2 sin(Θ2+Θr)]  Formula (3)
Considering the scaling factors with respect to the semi-major and semi-minor axes are different, in case the scaling factors with respect to X and Y axes are denoted as Kx and Ky, P1 could be further represented as Formula (4) below:P1=[Kx R2 cos(Θ2+Θr), Ky R2 sin(Θ2+Θr)]  Formula (4)
At last, considering the shift error, in case the vector of the shift error is denoted as (Dx, Dy), P1 could be further represented as Formula (5) below:P1=[Kx R2 cos(Θ2+Θr)+Dx, Ky R2 sin(Θ2+Θr)+Dy]  Formula (5)
In practical, the rotation error is quite small. So it is safe to assume that sin Θr is approximated to Θr and cos Θr is approximated to 1. Hence, two approximation Formulas (6a) and (6b) could be introduced below:cos(Θ2+Θr)˜˜cos(Θ2−Θr sin Θ2)  Formula (6a)sin(Θ2+Θr)˜˜sin(Θ2+Θr cos Θ2)  Formula (6b)
After bringing these two Formulas (6a) and (6b) into Formula (5), Formula (7) is generated below:P1=[Kx R2 cos Θ2−ΘrKxR2 sin Θ2+Dx, Ky R2 sin Θ2+ΘrKy R2 cos Θ2+Dy]  Formula (7)
If rewriting Formula (7) with respect to coordinate values, Formula (8) is generated accordingly:P1=[X1, Y1]=[Kx X1−ΘrKx Y2+Dx, Ky X2+ΘrKy Y2+Dy]  Formula (8)
Once rewriting the coefficients of Formula (8) and separating Formula (8) with respect to X and Y axes, Formulas (9a) and (9b) could be derived below:X1=A X2+BY2+C  Formula (9a)Y1=D X2+EY2+F  Formula (9b)
Formulas (9a) and (9b) look quite clean. Assuming that the rotation error is very small, using these two Formula (9a) and (9b) can convert coordinates between coordinate systems corresponding to the display module and the sensor module. After describing the error in mathematical model, the present application can provide the following embodiments based on the descriptions.